package com.dwj.generator;

import com.dwj.generator.config.datasource.DynamicDataSourceRegister;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Import;
import sun.tools.jar.CommandLine;

import java.net.InetAddress;

@ServletComponentScan
@SpringBootApplication
@MapperScan("com.dwj.generator.dao.mapper")
@Import(DynamicDataSourceRegister.class)
public class GeneratorApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(GeneratorApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        System.out.println("前端地址---"+"http://127.0.0.1:8888/easy-generator/page/login.html");
        System.out.println( InetAddress.getLocalHost().getHostAddress());
    }
}
